Optimal. Leaf size=61 \[ -\frac {i a^2 c^3 \sec ^4(e+f x)}{4 f}+\frac {a^2 c^3 \tan (e+f x)}{f}+\frac {a^2 c^3 \tan ^3(e+f x)}{3 f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 61, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.097, Rules used = {3603, 3567,
3852} \begin {gather*} \frac {a^2 c^3 \tan ^3(e+f x)}{3 f}+\frac {a^2 c^3 \tan (e+f x)}{f}-\frac {i a^2 c^3 \sec ^4(e+f x)}{4 f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3567
Rule 3603
Rule 3852
Rubi steps
\begin {align*} \int (a+i a \tan (e+f x))^2 (c-i c \tan (e+f x))^3 \, dx &=\left (a^2 c^2\right ) \int \sec ^4(e+f x) (c-i c \tan (e+f x)) \, dx\\ &=-\frac {i a^2 c^3 \sec ^4(e+f x)}{4 f}+\left (a^2 c^3\right ) \int \sec ^4(e+f x) \, dx\\ &=-\frac {i a^2 c^3 \sec ^4(e+f x)}{4 f}-\frac {\left (a^2 c^3\right ) \text {Subst}\left (\int \left (1+x^2\right ) \, dx,x,-\tan (e+f x)\right )}{f}\\ &=-\frac {i a^2 c^3 \sec ^4(e+f x)}{4 f}+\frac {a^2 c^3 \tan (e+f x)}{f}+\frac {a^2 c^3 \tan ^3(e+f x)}{3 f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.03, size = 52, normalized size = 0.85 \begin {gather*} \frac {a^2 c^3 \sec (e) \sec ^4(e+f x) (-3 i \cos (e)-3 \sin (e)+4 \sin (e+2 f x)+\sin (3 e+4 f x))}{12 f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.07, size = 54, normalized size = 0.89
method | result | size |
risch | \(\frac {4 i a^{2} c^{3} \left (4 \,{\mathrm e}^{2 i \left (f x +e \right )}+1\right )}{3 f \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{4}}\) | \(39\) |
derivativedivides | \(\frac {i a^{2} c^{3} \left (-i \tan \left (f x +e \right )-\frac {\left (\tan ^{4}\left (f x +e \right )\right )}{4}-\frac {i \left (\tan ^{3}\left (f x +e \right )\right )}{3}-\frac {\left (\tan ^{2}\left (f x +e \right )\right )}{2}\right )}{f}\) | \(54\) |
default | \(\frac {i a^{2} c^{3} \left (-i \tan \left (f x +e \right )-\frac {\left (\tan ^{4}\left (f x +e \right )\right )}{4}-\frac {i \left (\tan ^{3}\left (f x +e \right )\right )}{3}-\frac {\left (\tan ^{2}\left (f x +e \right )\right )}{2}\right )}{f}\) | \(54\) |
norman | \(\frac {a^{2} c^{3} \tan \left (f x +e \right )}{f}+\frac {a^{2} c^{3} \left (\tan ^{3}\left (f x +e \right )\right )}{3 f}-\frac {i a^{2} c^{3} \left (\tan ^{2}\left (f x +e \right )\right )}{2 f}-\frac {i a^{2} c^{3} \left (\tan ^{4}\left (f x +e \right )\right )}{4 f}\) | \(77\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.53, size = 72, normalized size = 1.18 \begin {gather*} -\frac {3 i \, a^{2} c^{3} \tan \left (f x + e\right )^{4} - 4 \, a^{2} c^{3} \tan \left (f x + e\right )^{3} + 6 i \, a^{2} c^{3} \tan \left (f x + e\right )^{2} - 12 \, a^{2} c^{3} \tan \left (f x + e\right )}{12 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 1.20, size = 84, normalized size = 1.38 \begin {gather*} -\frac {4 \, {\left (-4 i \, a^{2} c^{3} e^{\left (2 i \, f x + 2 i \, e\right )} - i \, a^{2} c^{3}\right )}}{3 \, {\left (f e^{\left (8 i \, f x + 8 i \, e\right )} + 4 \, f e^{\left (6 i \, f x + 6 i \, e\right )} + 6 \, f e^{\left (4 i \, f x + 4 i \, e\right )} + 4 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 112 vs. \(2 (53) = 106\).
time = 0.28, size = 112, normalized size = 1.84 \begin {gather*} \frac {16 i a^{2} c^{3} e^{2 i e} e^{2 i f x} + 4 i a^{2} c^{3}}{3 f e^{8 i e} e^{8 i f x} + 12 f e^{6 i e} e^{6 i f x} + 18 f e^{4 i e} e^{4 i f x} + 12 f e^{2 i e} e^{2 i f x} + 3 f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.62, size = 84, normalized size = 1.38 \begin {gather*} -\frac {4 \, {\left (-4 i \, a^{2} c^{3} e^{\left (2 i \, f x + 2 i \, e\right )} - i \, a^{2} c^{3}\right )}}{3 \, {\left (f e^{\left (8 i \, f x + 8 i \, e\right )} + 4 \, f e^{\left (6 i \, f x + 6 i \, e\right )} + 6 \, f e^{\left (4 i \, f x + 4 i \, e\right )} + 4 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 4.75, size = 80, normalized size = 1.31 \begin {gather*} \frac {a^2\,c^3\,\sin \left (e+f\,x\right )\,\left (12\,{\cos \left (e+f\,x\right )}^3-{\cos \left (e+f\,x\right )}^2\,\sin \left (e+f\,x\right )\,6{}\mathrm {i}+4\,\cos \left (e+f\,x\right )\,{\sin \left (e+f\,x\right )}^2-{\sin \left (e+f\,x\right )}^3\,3{}\mathrm {i}\right )}{12\,f\,{\cos \left (e+f\,x\right )}^4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________